package com.zyh.dao.impl;

import com.zyh.dao.IBookDao;
import lombok.Setter;

import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.Set;

/**
 * @author cyrus
 */
@Setter
public class BookDaoImpl implements IBookDao {

    private String[] strArr;
    private List<String> list;
    private Set<String> set;
    private Map<String, Integer> map;
    private Properties properties;

    @Override
    public void save() {
        System.out.println("book save ...");
        for (int i = 0; i < strArr.length; i++) {
            System.out.println(strArr[i]);
        }
        System.out.println("================");
        list.forEach(System.out::println);
        System.out.println("===========");
        set.forEach(System.out::println);
        System.out.println("=================");
        map.entrySet().forEach(stringIntegerEntry -> {
            System.out.println("key:"+stringIntegerEntry.getKey()+" value:"+stringIntegerEntry.getValue());
        });
        System.out.println("==================");
        properties.entrySet().forEach(stringIntegerEntry -> {
            System.out.println("key:"+stringIntegerEntry.getKey()+" value:"+stringIntegerEntry.getValue());
        });
    }
}
